<template>
    <div class="page_companyIntroduce">
        <van-nav-bar title="公司介绍"
            left-arrow
            @click-left="$router.back()">
        </van-nav-bar>
        <div class="character">{{message}}</div>
        <van-row gutter="20" class="photos">
            <van-col span="8" v-for="(image, index) in photos" :key="index">
                <van-image
                width="110"
                height="110"
                :src="image"
                @click="bigImage(image)"
                />
            </van-col>
        </van-row>
    </div>
</template>
<script>
  import { ImagePreview } from 'vant';
export default {
    data(){
        return{
            message:"",
            photos:"",
            companyId:""
        }
    },  
    async created() {
        if (this.$route.params.id) {
            this.companyId = this.$route.params.id;
            const res = await this.$api.company.reqCompanyMes(this.companyId)
            this.message=res.data.intro
            if(res.data.imgurl!=""){
                this.photos=res.data.imgurl.split(',')
            }
        } else {
            this.$router.back()
        }
    },
    methods:{
    bigImage(img){
        ImagePreview({
          images: [img],
          closeable: true,
        })
      },
    }
}
</script>
<style lang="less">
.page_companyIntroduce{
    min-height: 100vh;
    background: #fff;
    .character{
        margin: 0.53333rem 0.42667rem;
        padding: 0.26667rem 0;
        border-bottom: 0.02667rem solid #ebedf0;
        font-size: 0.37333rem;
    }
    .photos{
        padding: 0.26667rem 0.42667rem;
        .van-col{
            margin-bottom: 10px;
        }
    }
}
</style>